package com.bysc.commentservice.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.bysc.commonutils.vo.TitleVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * <p>
 * 
 * </p>
 *
 * @author kkk
 * @since 2024-06-15
 */
@Data
@Document(collection = "sonComment")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CommentSon对象", description="")
public class CommentSon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评论ID")
    private String id;

    @ApiModelProperty(value = "帖子ID")
    @Field
    private String postId;

    @ApiModelProperty(value = "评论内容")
    @Field
    private String content;

    @ApiModelProperty(value = "评论图片")
    @Field
    private String contentImage;

    @ApiModelProperty(value = "用户ID")
    @Field
    private String userId;

    @ApiModelProperty(value = "用户昵称")
    private String userName;

    @ApiModelProperty(value = "用户使用中的头衔（json）")
    private List<TitleVo> userUseTitle;
    @ApiModelProperty(value = "是否为协会成员，0-不是，1-是")
    private Boolean isJoin;
    @ApiModelProperty(value = "用户头像")
    private String userAvatar;

    @ApiModelProperty(value = "点赞量")
    private Integer likes;

    @ApiModelProperty(value = "父评论ID")
    @Field
    private String parentCommentId;
    @ApiModelProperty(value = "祖宗评论ID")
    @Field
    private String ppCommentId;
    @ApiModelProperty(value = "父评论用户ID")
    @Field
    private String parentUserId;
    @ApiModelProperty(value = "父评论用户昵称")
    private String parentUserName;
    @ApiModelProperty(value = "是否点赞过（0未点赞、1已点赞）")
    private Boolean isLiked;
    @ApiModelProperty(value = "逻辑删除（0未删除、1已删除）")
    @Field
    private Boolean isDeleted;

    @ApiModelProperty(value = "创建时间")
    @Field
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @Field
    private Date gmtModified;

    @ApiModelProperty(value = "点赞数量")
    @Field
    private Integer liked;

    @ApiModelProperty(value = "是否被点赞")
    @Field
    private Integer isLiked;
}
